import { RouteRecordRaw } from "vue-router";
import PageView from '../layouts/PageView.vue'
import {
    PieChartOutlined,
    MailOutlined,
    DesktopOutlined,
} from '@ant-design/icons-vue';

export const asyncRouterMap: RouteRecordRaw[] = [
    {
        path: '/',
        component: PageView,
        meta: { title: 'PageView', icon: PieChartOutlined },
        children: [
            {
                path: '/welcome',
                name: 'welcome',
                component: () => import('../views/welcome.vue'),
                meta: {
                    title: '欢迎页',
                    icon: MailOutlined,
                    code: 'welcome'
                }
            },
            {
                path: '/user',
                name: 'user',
                component: () => import('../views/index2.vue'),
                meta: {
                    title: '用户管理',
                    code: 'user'
                },
                children: [
                    {
                        path: '/index2-1',
                        name: 'index2-1',
                        component: () => import('../views/index2-1.vue'),
                        meta: {
                            title: '用户管理',
                            icon: MailOutlined,
                            code: 'userList'
                        }
                    },
                    {
                        path: '/index2-2',
                        name: 'index2-2',
                        component: () => import('../views/index2-2.vue'),
                        meta: {
                            title: '角色管理',
                            icon: MailOutlined,
                            code: 'roleList'
                        }
                    },
                ]
            },
        ]
    },
    {
        path: '/path',
        name: 'path',
        meta: {
            title: 'path',
            icon: DesktopOutlined
        }
    },
    {
        path: '/path2',
        name: 'path2',
        meta: {
            title: 'path2',
            icon: DesktopOutlined,
            code: 'path2'
        }
    },
]
